package com.iw.core.security.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.iw.core.orm.hibernate.BaseDao;
import com.iw.core.orm.hibernate.BaseService;
import com.iw.core.security.entity.ResourcesGroup;

@Service
@Transactional
public class ResourcesGroupService extends BaseService<ResourcesGroup> {
	@Override
	@Resource(name = "resourcesGroupDao")
	public void setBaseDao(BaseDao<ResourcesGroup> baseDao) {
		this.baseDao = baseDao;
	}

	public List<ResourcesGroup> findMenu() {
		return baseDao.findList("from ResourcesGroup where isMenu = 1 order by gorder");
	}

}
